#include <iostream>
#include <deque>
using namespace std;
int main()
{
    deque<int> stk;
    stk.push_back(1);
    stk.push_back(2);
    stk.push_back(100);
    stk.push_back(4);
    stk.push_back(5);

    stk.push_front(1);
    for (deque<int>::iterator it = stk.begin(); it != stk.end(); it++)
    {
        cout << *it << " ";
    }
    cout << endl;
    cout << "the last element :" << stk.back() << endl;
    for (deque<int>::iterator it = stk.begin(); it != stk.end(); it++)
    {
        cout << *it << " ";
    }
    cout << endl;
    cout << "pop_back():" ;
    stk.pop_back();
    for (deque<int>::iterator it = stk.begin(); it != stk.end(); it++)
    {
        cout << *it << " ";
    }
    cout << endl;
    return 0;
}